package com.fs.cv.service.impl;

import com.fs.cv.dao.ClassroomInfoDao;
import com.fs.cv.pojo.pojodao.Classroom;
import com.fs.cv.service.ClassroomInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @工程名: SSM项目
 * @描述：
 * @作者: 小梁子
 * @创建时间: 2020-10-10 10:02
 **/

@Service
public class ClassroomInfoImpl implements ClassroomInfoService {

    @Autowired
    private ClassroomInfoDao classroomInfoDao;

    //查询所有教室信息
    @Override
    public List<Classroom> getAllClassroomInfo() {
        return classroomInfoDao.getAllClassroomInfo();
    }


    //增加一个教室信息
    @Override
    public Integer addOneClassroom(Classroom classroom) {
        return classroomInfoDao.addOneClassroom(classroom);
    }

    //通过教室ID获取本教室信息
    @Override
    public Classroom getOneClassroomInfo(Integer classroomId) {
        return classroomInfoDao.getOneClassroomInfo(classroomId);
    }

    //修改教室信息
    @Override
    public Integer editClassroomInfo(Classroom classroom) {
        return classroomInfoDao.editClassroomInfo(classroom);
    }

    @Override
    public Integer deleteOneClassroomInfo(Integer classroomId) {
        return classroomInfoDao.deleteOneClassroomInfo(classroomId);
    }
}
